﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using JFnetcore.Models;
using Domain.Entities;
using Application.ArticleApp;
using Utility;
using System.Collections;
using System.Web;
using Microsoft.AspNetCore.Http;
using System.Net.Http.Headers;
using System.IO;
using Application.ReplyApp;
using Application.UserApp;
using Application.ArticleTypeApp;
using JFnetcore.Models.ViewModel;
using System.Text;
using Application.ConfigApp;
using Application.LogApp;
using static Utility.EnumUtil;

// For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860

namespace JFnetcore.Controllers
{
    public class WikiController : BaseController
    {
        private ILogAppService _logAppService;
        private IArticleAppService _ArticleAppService;
        private IArticleTypeAppService _ArticleTypeAppService;
        private IReplyAppService _ReplyAppService;
        private IUserAppService _UserAppService;
        private IConfigAppService _ConfigAppService;
        public WikiController(
            ILogAppService logAppService,
            IArticleAppService ArticleAppService,
            IReplyAppService ReplyAppService,
            IUserAppService UserAppService,
            IArticleTypeAppService ArticleTypeAppService,
            IConfigAppService ConfigAppService)
        {
            _logAppService = logAppService;
            _ArticleAppService = ArticleAppService;
            _ReplyAppService = ReplyAppService;
            _UserAppService = UserAppService;
            _ArticleTypeAppService = ArticleTypeAppService;
            _ConfigAppService = ConfigAppService;
        }

        #region 金帆论坛

        #region 论坛首页

        /// <summary>
        /// 打开论坛首页视图
        /// </summary>
        /// <returns></returns>
        public IActionResult Main()
        {
            //获取Session信息并且返回前台
            User userSession = getUserSession().User;

            List<ArticleType> Articletypelist = _ArticleTypeAppService.GetAll("");
            List<User> Userlist = _UserAppService.GetAll("");


            //ViewBag.Modellist = _ArticleAppService.GetPageList(1,2, "", "1", "", 10, 1, "Createtime", false);//类型1
            List<Article> Articlelist1 = _ArticleAppService.GetPageList(1, 2, "", "1", "", 10, 1, "Createtime", false);//类型1
            ViewBag.Modellist = new CS.vArticleHelp().GetVArticleList(Articlelist1, Articletypelist, Userlist);


            //ViewBag.Modellist2 = _ArticleAppService.GetPageList(2,2, "", "1", "", 10, 1, "Createtime", false);//类型2
            List<Article> Articlelist2 = _ArticleAppService.GetPageList(2, 2, "", "1", "", 10, 1, "Createtime", false);//类型2
            ViewBag.Modellist2 = new CS.vArticleHelp().GetVArticleList(Articlelist2, Articletypelist, Userlist);


            //ViewBag.Modellist3 = _ArticleAppService.GetPageList(3,2, "", "1", "", 10, 1, "Createtime", false);//类型3
            List<Article> Articlelist3 = _ArticleAppService.GetPageList(3, 2, "", "1", "", 10, 1, "Createtime", false);//类型3
            ViewBag.Modellist3 = new CS.vArticleHelp().GetVArticleList(Articlelist3, Articletypelist, Userlist);

            return View();

        }

        #endregion

        #region 文章列表
        /// <summary>
        /// 打开论坛文章列表视图
        /// </summary>
        /// <param name="pagemodel"></param>
        /// <returns></returns>
        public IActionResult List(PageModel pagemodel)
        {
            //获取Session信息并且返回前台
            User userSession = getUserSession().User;

            if (string.IsNullOrEmpty(pagemodel.PageCurrent))
                pagemodel.PageCurrent = "1";
            if (string.IsNullOrEmpty(pagemodel.PageSize))
                pagemodel.PageSize = "30";
            ViewBag.SearchKeyWords = pagemodel.SearchKeyWords;
            ViewBag.PageSize = pagemodel.PageSize;
            ViewBag.PageCurrent = pagemodel.PageCurrent;
            ViewBag.OrderField = pagemodel.OrderField;
            ViewBag.OrderDirection = pagemodel.OrderDirection;
            ViewBag.ArticleTypeId = pagemodel.ArticleTypeId;
            if (string.IsNullOrEmpty(pagemodel.ArticleTypeId))
                pagemodel.ArticleTypeId = "0";
            ViewBag.ArticleTypeName = pagemodel.ArticleTypeName;
            ViewBag.AllRecords = _ArticleAppService.GetAll(pagemodel.SearchKeyWords).Count;
            //ViewBag.Modellist = _ArticleAppService.GetPageList(0,2,"0", "1", pagemodel.SearchKeyWords, int.Parse(pagemodel.PageSize), int.Parse(pagemodel.PageCurrent), "Createtime", false);

            List<Article> Articlelist = _ArticleAppService.GetPageList(Int32.Parse(pagemodel.ArticleTypeId), 2, "0", "1", pagemodel.SearchKeyWords, int.Parse(pagemodel.PageSize), int.Parse(pagemodel.PageCurrent), "Createtime", false);
            List<ArticleType> Articletypelist = _ArticleTypeAppService.GetAll("");
            List<User> Userlist = _UserAppService.GetAll("");
            ViewBag.Modellist = new CS.vArticleHelp().GetVArticleList(Articlelist, Articletypelist, Userlist);
            return View();

        }

        /// <summary>
        /// 打开文章内容视图
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public IActionResult Article(string id)
        {
            var model = _ArticleAppService.GetById(Int32.Parse(id));
            string replyvalue = _ConfigAppService.GetByName("replay").Config_value;
            ViewBag.Replys = GetReplyTree(id, "0", replyvalue);
            ViewBag.Replaypower = replyvalue;
            return View(model);
        }

        /// <summary>
        /// 表单提交文章回复接口
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult Reply(Reply model)
        {
            if (_ConfigAppService.GetByName("replay").Config_value == "0")
            {
                return Content(ReturnJsonHelp.BJUIajaxJson(300, "提交失败,论坛回复功能已经关闭！", "", "", "", false, "", ""));
            }
            else
            {
                SessionModel sm = getUserSession();
                model.User_Id = sm.User.Id;
                model.Createtime = DateTime.Now;
                if (_ReplyAppService.AddOrUpdate(model))
                {
                    _logAppService.Add(DateTime.Now, sm.IP, sm.User.Id.ToString(), (int)OperationEnum.add, "回复文章:"+_ArticleAppService.GetById(model.Article_Id).Article_name);
                    return Content(ReturnJsonHelp.BJUIajaxJson(200, "提交成功！", "WikiMain,WikiIndex,WikiList,WikiMylist,WikiArticle", "", "", false, "", ""));
                }
                else
                {
                    return Content(ReturnJsonHelp.BJUIajaxJson(300, "提交失败！", "", "", "", false, "", ""));
                }
            }
        }

        /// <summary>
        /// 递归获取
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public string GetReplyTree(string Articleid, string pid, string replyvalue)
        {
            List<Reply> list = _ReplyAppService.GetAll(Articleid, pid);
            int x = 1;
            string replystr = "";
            foreach (Reply i in list)
            {
                string rname = _UserAppService.GetById(i.User_Id).User_name;
                replystr += "<div class=\"bs-callout bs-callout-warning\">";
                if (i.Parent_Id == 0)
                    replystr += "#" + x + " 楼 ";
                replystr += i.Createtime.ToString("yyyy -MM-dd HH:ss") + " " + rname + "  ";
                if (i.User_Id != getUserSession().User.Id && replyvalue != "0")
                    replystr += " <button type=\"button\" class=\"btn-blue\" onclick=\"huifu('" + i.Id + "','" + i.Reply_txt + "','" + rname + "')\">回复</button>";
                replystr += "    <div class=\"alert alert-success\" role=\"alert\" style=\"margin:0 0 5px; padding:5px 15px; \">";
                replystr += i.Reply_txt;
                replystr += "    </div>";
                replystr += GetReplyTree(Articleid, i.Id.ToString(), replyvalue);
                replystr += "</div>";
                if (i.Parent_Id == 0)
                    x++;
            }
            return replystr.ToString();
        }
        #endregion

        #endregion

        #region 我的空间

        #region 最新动态
        /// <summary>
        /// 打开个人空间最新动态视图
        /// </summary>
        /// <returns></returns>
        public IActionResult Index()
        {
            //获取Session信息并且返回前台
            User userSession = getUserSession().User;

            return View();

        }
        #endregion

        #region 发布文章
        /// <summary>
        /// 打开文章编辑视图
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public IActionResult Edit(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                return View();
            }
            else
            {
                var model = _ArticleAppService.GetById(Int32.Parse(id));
                return View(model);
            }

        }

        /// <summary>
        /// 表单提交文章编辑接口
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost("WikiEdit")]
        public IActionResult WikiEdit(Article model)
        {
            if (model.Id == 0)
            {
                model.User_Id = getUserSession().User.Id;
                DateTime n = DateTime.Now;
                model.Createtime = n;
                model.Admin_Createtime = n;
                model.Admin_step = getStep();
            }
            else
            {
                Article m = _ArticleAppService.GetById(model.Id);
                m.User_Id = getUserSession().User.Id;
                DateTime n = DateTime.Now;
                m.Createtime = n;
                m.Admin_Createtime = n;
                if (m.Admin_step == 3)
                    m.Admin_step = 4;
                else
                    m.Admin_step = getStep();
                m.Article_key = model.Article_key;
                m.Article_name = model.Article_name;
                m.Article_txt = model.Article_txt;
                m.Disable = model.Disable;
                m.Disabledesc = model.Disabledesc;
                m.ArticleType_Id = model.ArticleType_Id;

                model = m;
            }
            if (_ArticleAppService.AddOrUpdate(model))
            {
                SessionModel sm = getUserSession();
                _logAppService.Add(DateTime.Now, sm.IP, sm.User.Id.ToString(), (int)OperationEnum.update, "编辑文章:" + model.Article_name);
                return Content(ReturnJsonHelp.BJUIajaxJson(200, "提交成功！", "WikiMain,WikiIndex,WikiList,WikiMylist", "", "", true, "", ""));
            }
            else
            {
                return Content(ReturnJsonHelp.BJUIajaxJson(300, "提交失败！", "", "", "", false, "", ""));
            }

        }

        /// <summary>
        /// 配置表获取参数，返回  提交文章后的状态值
        /// </summary>
        /// <param name="step"></param>
        /// <returns></returns>
        private int getStep()
        {
            Config modle = _ConfigAppService.GetByName("audit");
            if (modle != null)
            {
                if (modle.Config_value == "1")
                {
                    return 1;
                }
                else
                {
                    return 2;
                }
            }
            else
            {
                return 2;
            }
        }

        /// <summary>
        /// Kindeditor图片上传
        /// </summary>
        /// <param name="imgFile">Kindeditor图片上传自带的命名，不可更改名称</param>
        /// <param name="dir">不可更改名称 这里没有用到dir</param>
        /// <returns></returns>
        public IActionResult KindeditorPicUpload(IList<IFormFile> imgFile, string dir)
        {
            PicUploadResponse rspJson = new PicUploadResponse() { error = 0, url = "/upload/" };
            long size = 0;
            string tempname = "";
            foreach (var file in imgFile)
            {
                var filename = ContentDispositionHeaderValue
                                .Parse(file.ContentDisposition)
                                .FileName
                                .Trim('"');
                var extname = filename.Substring(filename.LastIndexOf("."), filename.Length - filename.LastIndexOf("."));
                var filename1 = System.Guid.NewGuid().ToString() + extname;
                tempname = filename1;
                filename = System.IO.Directory.GetCurrentDirectory() + "/wwwroot/KEupload/" + filename1;
                size += file.Length;
                using (FileStream fs = System.IO.File.Create(filename))
                {
                    file.CopyTo(fs);
                    fs.Flush();
                    //这里是业务逻辑
                }
            }
            rspJson.error = 0;
            rspJson.url = "/KEupload/" + tempname;
            return Json(rspJson);
        }

        /// <summary>
        /// 文章编辑视图，加载类型选择视图
        /// </summary>
        /// <returns></returns>
        public IActionResult SearchType()
        {
            StringBuilder resultstr = new StringBuilder();
            List<ArticleType> list = _ArticleTypeAppService.GetAll("").Where(i => i.Disable == 1).ToList();
            resultstr.Append("[");
            int y = 0;
            foreach (ArticleType a in list)
            {
                resultstr.Append("{\"ArticleType_id\":\"" + a.Id + "\",\"ArticleType_name\":\"" + a.ArticleType_name + "\"},");
                y++;
            }
            if (y > 0)
                resultstr.Remove(resultstr.ToString().LastIndexOf(','), 1);
            resultstr.Append("]");
            return Content(resultstr.ToString());
        }
        #endregion

        #region 我的文章
        /// <summary>
        /// 打开个人文章列表视图
        /// </summary>
        /// <param name="pagemodel"></param>
        /// <returns></returns>
        public IActionResult Mylist(PageModel pagemodel)
        {
            //获取Session信息并且返回前台
            User userSession = getUserSession().User;

            if (string.IsNullOrEmpty(pagemodel.PageCurrent))
                pagemodel.PageCurrent = "1";
            if (string.IsNullOrEmpty(pagemodel.PageSize))
                pagemodel.PageSize = "30";
            ViewBag.SearchKeyWords = pagemodel.SearchKeyWords;
            ViewBag.PageSize = pagemodel.PageSize;
            ViewBag.PageCurrent = pagemodel.PageCurrent;
            ViewBag.OrderField = pagemodel.OrderField;
            ViewBag.OrderDirection = pagemodel.OrderDirection;
            ViewBag.AllRecords = _ArticleAppService.GetAll(pagemodel.SearchKeyWords).Count;
            //ViewBag.Modellist = _ArticleAppService.GetPageList(0, 0, userSession.Id.ToString(), "", pagemodel.SearchKeyWords, int.Parse(pagemodel.PageSize), int.Parse(pagemodel.PageCurrent), "Createtime", false);

            List<Article> Articlelist = _ArticleAppService.GetPageList(0, 0, userSession.Id.ToString(), "", pagemodel.SearchKeyWords, int.Parse(pagemodel.PageSize), int.Parse(pagemodel.PageCurrent), "Createtime", false);
            List<ArticleType> Articletypelist = _ArticleTypeAppService.GetAll("");
            List<User> Userlist = _UserAppService.GetAll("");
            ViewBag.Modellist = new CS.vArticleHelp().GetVArticleList(Articlelist, Articletypelist, Userlist);
            return View();

        }
        /// <summary>
        /// 按钮删除文章接口
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public IActionResult ArticleDelete(string id)
        {
            string name = _ArticleAppService.GetById(int.Parse(id)).Article_name;
            if (_ArticleAppService.DeleteById(int.Parse(id)))
            {
                SessionModel sm = getUserSession();
                _logAppService.Add(DateTime.Now, sm.IP, sm.User.Id.ToString(), (int)OperationEnum.delete, "删除文章:" + name);
                return Content(ReturnJsonHelp.BJUIajaxJson(200, "删除成功！", "WikiMain,WikiIndex,WikiList,WikiMylist", "", "", false, "", ""));
            }
            else
            {
                return Content(ReturnJsonHelp.BJUIajaxJson(300, "删除失败！", "", "", "", false, "", ""));
            }
        }

        #endregion

        #endregion

        #region 论坛管理

        #region 类型管理
        /// <summary>
        /// 打开类型列表视图
        /// </summary>
        /// <returns></returns>
        public IActionResult ArticleType(PageModel pagemodel)
        {
            //获取Session信息并且返回前台
            User userSession = getUserSession().User;

            if (string.IsNullOrEmpty(pagemodel.PageCurrent))
                pagemodel.PageCurrent = "1";
            if (string.IsNullOrEmpty(pagemodel.PageSize))
                pagemodel.PageSize = "30";
            ViewBag.SearchKeyWords = pagemodel.SearchKeyWords;
            ViewBag.PageSize = pagemodel.PageSize;
            ViewBag.PageCurrent = pagemodel.PageCurrent;
            ViewBag.OrderField = pagemodel.OrderField;
            ViewBag.OrderDirection = pagemodel.OrderDirection;
            ViewBag.AllRecords = _ArticleTypeAppService.GetAll(pagemodel.SearchKeyWords).Count;
            ViewBag.Modellist = _ArticleTypeAppService.GetPageList(pagemodel.SearchKeyWords, int.Parse(pagemodel.PageSize), int.Parse(pagemodel.PageCurrent), "Createtime", false);
            return View();

        }
        /// <summary>
        /// 按钮提交类型删除接口
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public IActionResult ArticleTypeDelete(string id)
        {
            if (_ArticleAppService.GetAll(Int32.Parse(id)).Count() > 0)
            {
                return Content(ReturnJsonHelp.BJUIajaxJson(300, "删除失败,该类型下有文章！", "", "", "", false, "", ""));
            }
            else
            {
                string name = _ArticleTypeAppService.GetById(int.Parse(id)).ArticleType_name;
                if (_ArticleTypeAppService.DeleteById(int.Parse(id)))
                {
                    SessionModel sm = getUserSession();
                    _logAppService.Add(DateTime.Now, sm.IP, sm.User.Id.ToString(), (int)OperationEnum.delete, "删除文章类型:" + name);
                    return Content(ReturnJsonHelp.BJUIajaxJson(200, "删除成功！", "WikiArticleType", "", "", false, "", ""));
                }
                else
                {
                    return Content(ReturnJsonHelp.BJUIajaxJson(300, "删除失败！", "", "", "", false, "", ""));
                }
            }
        }
        /// <summary>
        /// 打开类型编辑视图，添加类型
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public IActionResult ArticleTypeEdit(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                return View();
            }
            else
            {
                var model = _ArticleTypeAppService.GetById(Int32.Parse(id));
                return View(model);
            }

        }

        /// <summary>
        ///表单提交类型编辑接口 
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost("EditArticleType")]
        public IActionResult EditArticleType(ArticleType model)
        {
            model.Createtime = DateTime.Now;
            if (_ArticleTypeAppService.AddOrUpdate(model))
            {
                SessionModel sm = getUserSession();
                _logAppService.Add(DateTime.Now, sm.IP, sm.User.Id.ToString(), (int)OperationEnum.delete, "编辑文章类型:" + model.ArticleType_name);
                return Content(ReturnJsonHelp.BJUIajaxJson(200, "提交成功！", "WikiArticleType", "", "", true, "", ""));
            }
            else
            {
                return Content(ReturnJsonHelp.BJUIajaxJson(300, "提交失败！", "", "", "", false, "", ""));
            }
        }
        #endregion

        #region 审核管理
        /// <summary>
        /// 打开论坛管理文章管理列表视图
        /// </summary>
        /// <param name="pagemodel"></param>
        /// <returns></returns>
        public IActionResult AdminList(PageModel pagemodel)
        {
            //获取Session信息并且返回前台
            User userSession = getUserSession().User;

            if (string.IsNullOrEmpty(pagemodel.PageCurrent))
                pagemodel.PageCurrent = "1";
            if (string.IsNullOrEmpty(pagemodel.PageSize))
                pagemodel.PageSize = "30";
            ViewBag.SearchKeyWords = pagemodel.SearchKeyWords;
            ViewBag.PageSize = pagemodel.PageSize;
            ViewBag.PageCurrent = pagemodel.PageCurrent;
            ViewBag.OrderField = pagemodel.OrderField;
            ViewBag.OrderDirection = pagemodel.OrderDirection;
            ViewBag.AllRecords = _ArticleAppService.GetAll(pagemodel.SearchKeyWords).Count;
            //ViewBag.Modellist = _ArticleAppService.GetPageList(0, 0, "0", "1", pagemodel.SearchKeyWords, int.Parse(pagemodel.PageSize), int.Parse(pagemodel.PageCurrent), "Createtime", false);

            List<Article> Articlelist = _ArticleAppService.GetPageList(0, 0, "0", "1", pagemodel.SearchKeyWords, int.Parse(pagemodel.PageSize), int.Parse(pagemodel.PageCurrent), "Createtime", false);
            List<ArticleType> Articletypelist = _ArticleTypeAppService.GetAll("");
            List<User> Userlist = _UserAppService.GetAll("");
            ViewBag.Modellist = new CS.vArticleHelp().GetVArticleList(Articlelist, Articletypelist, Userlist);
            return View();

        }
        /// <summary>
        /// 打开文章驳回，驳回建议视图
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public IActionResult AdminBack(string id)
        {
            var model = _ArticleAppService.GetById(Int32.Parse(id));
            return View(model);
        }

        /// <summary>
        /// 按钮审核通过
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public IActionResult AdminSuccess(string id)
        {
            var model = _ArticleAppService.GetById(Int32.Parse(id));
            model.Admin_Createtime = DateTime.Now;
            model.Admin_Id = getUserSession().User.Id;
            model.Admin_step = 2;
            if (_ArticleAppService.AddOrUpdate(model))
            {
                SessionModel sm = getUserSession();
                _logAppService.Add(DateTime.Now, sm.IP, sm.User.Id.ToString(), (int)OperationEnum.success, "审核通过文章:" + model.Article_name);
                return Content(ReturnJsonHelp.BJUIajaxJson(200, "提交成功！", "WikiAdminList", "", "", false, "", ""));
            }
            else
            {
                return Content(ReturnJsonHelp.BJUIajaxJson(300, "提交失败！", "", "", "", false, "", ""));
            }

        }

        /// <summary>
        /// 表单提交文章驳回接口
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost("AdminBack")]
        public IActionResult AdminBack(Article model)
        {
            Article m = _ArticleAppService.GetById(model.Id);
            m.Admin_Id = getUserSession().User.Id;
            m.Admin_Createtime = DateTime.Now;
            m.Admin_remark = model.Admin_remark;
            m.Admin_step = 3;
            if (_ArticleAppService.AddOrUpdate(m))
            {
                SessionModel sm = getUserSession();
                _logAppService.Add(DateTime.Now, sm.IP, sm.User.Id.ToString(), (int)OperationEnum.back, "驳回文章:" + m.Article_name);
                return Content(ReturnJsonHelp.BJUIajaxJson(200, "提交成功！", "WikiAdminList", "", "", true, "", ""));
            }
            else
            {
                return Content(ReturnJsonHelp.BJUIajaxJson(300, "提交失败！", "", "", "", false, "", ""));
            }

        }


        #endregion

        #region 参数管理
        /// <summary>
        /// 打开参数设置视图
        /// </summary>
        /// <returns></returns>
        public IActionResult Configs()
        {
            //获取Session信息并且返回前台
            SessionModel userSession = getUserSession();

            ViewBag.audit = _ConfigAppService.GetByName("audit").Config_value;
            ViewBag.replay = _ConfigAppService.GetByName("replay").Config_value;
            return View();

        }

        /// <summary>
        /// 修改参数接口
        /// </summary>
        /// <param name="key"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        [Route("Wiki/ConfigUpdate/{key?}/{value?}")]
        public IActionResult ConfigUpdate(string key, string value)
        {
            Config model = _ConfigAppService.GetByName(key);
            model.Config_value = value;
            if (_ConfigAppService.AddOrUpdate(model))
            {
                SessionModel sm = getUserSession();
                _logAppService.Add(DateTime.Now, sm.IP, sm.User.Id.ToString(), (int)EnumUtil.OperationEnum.update, "修改参数[" + key + "]为:" + value);
                return Content(ReturnJsonHelp.BJUIajaxJson(200, "提交成功！", "Configs", "", "", false, "", ""));
            }
            else
            {
                return Content(ReturnJsonHelp.BJUIajaxJson(300, "提交失败！", "Configs", "", "", false, "", ""));
            }
        }
        #endregion

        #endregion


    }
}
